package springboot.study.project.service;

import springboot.study.project.model.Dormitory;

import java.util.List;
import java.util.Map;

/**
 * @InterfaceName: DormitoryService
 * @Description: 宿舍相关接口
 * @Author: liu-hao
 * @Date: 2021-04-12 14:27
 * @Version: 1.0
 **/
public interface DormitoryService {
    /**
     * 添加宿舍
     *
     * @param dormitory
     * @return
     */
    boolean addDormitory(Dormitory dormitory);

    /**
     * 删除指定宿舍
     *
     * @param dormitoryId
     * @return
     */
    boolean removeDormitory(String dormitoryId);

    /**
     * 修改指定宿舍
     *
     * @return
     */
    boolean modifyDormitory(Dormitory dormitory);


    /**
     * 获取所有宿舍
     *
     * @return
     */
    List<Dormitory> getAllDormitory(String dormitoryId);

    /**
     * 通过宿舍ID获取宿舍信息
     *
     * @return
     */
    Dormitory findDormitoryById(String dormitoryId);

    /**
     * 获符合条件的宿舍集合
     *
     * @param dormitoryName
     * @param offset
     * @param pageSize
     * @return
     */
    Map<String, Object> findDormitory(String dormitoryName, int offset, int pageSize);
}
